package com.ys.timer;

import com.ys.service.finance.TcwWanliExchangeRateService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Controller;

@Controller
public class TimerTcwWanliExchangeRateDaily {
	private static final Logger logger = LoggerFactory.getLogger(TimerTcwWanliExchangeRateDaily.class);

	@Autowired
	private TcwWanliExchangeRateService tcwWanliExchangeRateService;

	//每天00:00:01点执行，归零万里汇CNY计算汇率表
	//@Scheduled(cron = "00 00 01 * * * ")
	public void addReFinanceExamineDaily() {
		try {
			logger.info("***********定时归零万里汇CNY计算汇率表***********");
			tcwWanliExchangeRateService.addByEveryDay();
			logger.info("***********定时归零万里汇CNY计算汇率表完成***********");
		}catch (Exception e){
			logger.error("定时归零万里汇CNY计算汇率表表出错：",e.getMessage(),e);
		}
	}



	
}
